import {
  publicChartsStyles,
  pubDatasetComponentType,
  pubLinkageSettingType,
  pubPenetrationSettingsType
} from '../constant';
import { cloneDeep } from 'lodash';
let copyPublicChartsStyles = cloneDeep(publicChartsStyles);

copyPublicChartsStyles.axisList.push({
  type: 'el-collapse',
  notShowLabel: true,
  label: 'y1轴',
  // name: 'yAxis',
  placeholder: '',
  value: '',
  children: [
    {
      type: 'el-select',
      label: '轴标题',
      name: 'axisTitleShowY1',
      placeholder: '',
      value: false,
      selectOptions: [
        {
          label: '显示',
          value: true
        },
        {
          label: '隐藏',
          value: false
        }
      ]
    },
    {
      type: 'el-select',
      label: '是否显示y1轴',
      name: 'showYAxis1',
      placeholder: '',
      value: true,
      selectOptions: [
        {
          label: '显示',
          value: true
        },
        {
          label: '隐藏',
          value: false
        }
      ]
    },
    {
      type: 'el-color-picker',
      label: 'y轴标题颜色',
      name: 'yAxis1LabelColor',
      placeholder: '',
      value: ''
    },
    {
      type: 'el-input-number',
      label: 'y轴字体大小',
      name: 'yAxis1LabelFontSize',
      required: false,
      placeholder: '',
      value: 14 //默认高200
    },
    {
      type: 'el-slider',
      label: 'y轴字体角度',
      name: 'yAxis1LabelRotate',
      required: false,
      placeholder: '',
      value: 0
    }
  ]
});
export const WidgetLineBar = {
  type: 'widget-line-bar',
  label: '折柱混合图',
  icon: 'widget-line-bar',
  options: {
    setups: [
      {
        type: 'el-input',
        label: '组件名称',
        name: 'componentName',
        required: true,
        placeholder: '',
        value: '折柱混合图'
      },
      cloneDeep(pubDatasetComponentType),

      {
        type: 'el-select',
        label: '横坐标',
        name: 'xAxis',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      {
        type: 'el-input',
        label: '图形值',
        name: 'yNum',
        readonly: true,
        placeholder: '',
        value: '最大10个'
      },
      {
        type: 'el-select',
        label: '主纵坐标',
        name: 'barChartValue',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      {
        type: 'el-select',
        label: '次纵坐标',
        name: 'y1Axis',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      cloneDeep(pubLinkageSettingType),
      cloneDeep(pubPenetrationSettingsType)
    ],

    styles: {
      ...cloneDeep(publicChartsStyles)
    }
  }
};
